<?php

class Model{
	
	protected $db=null;
	
	public function __construct(){
		try{
			$this->db=Mysql::getIns();
		}catch(Exception $e){
			$err = '';
            $err .= '错误代码:' . $e->getCode() . "\r\n";
            $err .= '错误信息:' . $e->getMessage() . "\r\n";
            $err .=  '文件:' . $e->getFile() . "\r\n";
            $err .=  '行号:' . $e->getLine() . "\r\n";
            echo '致命错误,代码',$e->getCode();
            log::write($err);
            exit;
		}
	}
	
}


?>